home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-14 | 1.3 KB | 32 lines | [TEXT/ToyS] |
- property theIters : [20, 40, 60, 80, 100, 120, 140, 160]
- property theDialog : {style:movable modal, name:"Gauge", size:[300, 125], contents:[¬
- {class:push button, bounds:[10, 95, 90, 115], name:"Forward"}, ¬
- {class:push button, bounds:[110, 95, 190, 115], name:"Backward"}, ¬
- {class:push button, bounds:[210, 95, 290, 115], name:"Done"}, ¬
- {class:pop up, bounds:[10 - 4, 50, 150, 50 + 20], name:"Iterations:", value:1, contents:theIters}, ¬
- {class:gauge, bounds:[10, 10, 290, 10 + 12], value:0, max value:100}, ¬
- {class:gauge, bounds:[10, 30, 290, 30 + 12], value:0, max value:-1} ¬
- ], default:3}
-
- dd install font {name:"Geneva", size:10} with greyscale
- set dlog to dd make dialog theDialog
-
- repeat
- set dClicked to dd interact with user --for max ticks 60
- if dClicked = 3 then exit repeat
- if dClicked = 1 then
- set maxVal to item (dd get value of item 4 of dlog) of theIters
- repeat with i from 1 to maxVal
- dd set value of item 5 of dlog to i
- dd set value of item 6 of dlog to i
- end repeat
- else if dClicked = 2 then
- set maxVal to item (dd get value of item 4 of dlog) of theIters
- repeat with i from maxVal to 0 by -1
- dd set value of item 5 of dlog to i
- dd set value of item 6 of dlog to i
- end repeat
- end if
- end repeat
- dd delete dlog
- dd uninstall